#ifndef TILE_H
#define TILE_H

#include <vector>

class GameObject;

// A tile is a single piece of the map that will keep track of the gameobjects that are on it.
class Tile
{
public:
	typedef std::vector<GameObject*> GameObjects;
	
	Tile(int x, int y);
	~Tile();

	void add(GameObject* gameObject);
    void remove(const GameObject* gameObject);
	
    bool isPassable(const GameObject* gameObject) const;

	void getUnPassableObjects(GameObjects& unPassableGameObjects, const GameObject* gameObject) const;

	// Order of the objects is determined by the order they are added to the tile.
	void draw() const;

private:
	GameObjects gameObjects;
	int x;
	int y;
};

#endif